﻿<%@ Page Language="C#" AutoEventWireup="true" 
CodeBehind="ComparativoInsertForm.aspx.cs" 
Inherits="UILGestion.ObraAdmin.Comparativos.ComparativoInsertForm" %>

<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc2" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="lib" %>
<%@ Register assembly="EstandarControl" namespace="EstandarControl" tagprefix="cc1" %>
<%@ Register src="../../Control/menuObraCtrl.ascx" tagname="menuObraCtrl" tagprefix="uc1" %>

<%@ Import Namespace="System.Web.Script.Services" %>
<%@ Import Namespace="System.Web.Services" %>
<%@ Register src="../../Control/ECItemSeleccionMonPanel.ascx" tagname="ECItemSeleccionMonPanel" tagprefix="uc2" %>
<%@ Register src="../../Control/ECOCPanel.ascx" tagname="ECOCPanel" tagprefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../../resources/css/main.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="../../estilos/_common/styles/theme.css" />
    <title>NUEVO COMPARATIVO</title>
    <script src="../../Scripts/Util.js" type="text/javascript"></script>
    <script src="../../Scripts/Comparativo.js" type="text/javascript"></script>
     
   
</head>
     <script type="text/javascript" >
         

   
    </script>
<body>
  
    <form id="form1" runat="server" autocomplete="off">
 
      <uc1:menuObraCtrl ID="menuObraCtrl1" runat="server" />
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
    EnableScriptGlobalization="true"  
     EnablePartialRendering="true"></asp:ToolkitScriptManager>
    
   
     
   <asp:Panel ID="pnlMain" runat="server" Visible="false" 
   CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
                 <asp:Label ID="Label1" runat="server" Text="NUEVO COMPARATIVO" style="font-size: large; color: #960818"></asp:Label>
                 </asp:Panel>
                 <asp:Panel ID="PanelButtom" runat="server" Visible="false"    class="ms-crm-Form-Body" >
                
   
                   <table >
<tr>

<td>
    <asp:Button ID="saveButton" runat="server" Text="Guardar"    OnClientClick="return confirm('Usted quiere Guardar el Comparativo?')"
        CssClass="ms-crm-List-Header" OnClick="btnContinue_OnClick"    />
       
    
    <asp:LinkButton ID="LinkButton2" runat="server"></asp:LinkButton>
    <asp:LinkButton ID="selectLinkButton" runat="server"></asp:LinkButton>

          <asp:modalpopupextender ID="seleccionPopupExtender" runat="server" 
                       BackgroundCssClass="modalBackground" cancelcontrolid="cancelarSelecProvButton" 
                       dropshadow="true" DynamicServicePath="" Enabled="True" 
                      RepositionMode="None" 
                    X="0" Y="0"
                       okcontrolid="selectLinkButton" popupcontrolid="proveedorPanel" 
                       popupdraghandlecontrolid="proveedorIntParentPanel" TargetControlID="LinkButton2"></asp:modalpopupextender>

       </td>
<td>
    <asp:Button ID="cancelarButton" runat="server" Text="Cancelar"  
       OnClick="btnContinue_OnClick"  CssClass="ms-crm-List-Header"/></td>
        <td>
            <asp:Button ID="AddECSelectBTN" runat="server" ClientIDMode="Static" 
                CssClass="ms-crm-List-Header" OnClick="accionItem_Click" 
                Text="Agregar Recurso E/C" />
                <asp:LinkButton ID="LinkButton1" runat="server"></asp:LinkButton>
        <asp:modalpopupextender ID="AddRecursoPopup" runat="server" 
            BackgroundCssClass="modalBackground" cancelcontrolid="CancelAddECItemButton" 
            dropshadow="True" okcontrolid="LinkButton3" popupcontrolid="AddECItemParent" 
            popupdraghandlecontrolid="AddAddECItem" RepositionMode="None" 
            targetcontrolid="LinkButton1" X="0" Y="0" DynamicServicePath="" 
            Enabled="True">
        </asp:modalpopupextender>
        <asp:LinkButton ID="LinkButton4" runat="server" />
        <asp:modalpopupextender ID="AddOCPopup" runat="server" 
            BackgroundCssClass="modalBackground" cancelcontrolid="CancelAddECItemOCButton" 
            dropshadow="True" okcontrolid="LinkButton4" popupcontrolid="AddECItemOCParent" 
            popupdraghandlecontrolid="AddAddECItemOC" RepositionMode="None" 
            targetcontrolid="LinkButton4" X="0" Y="0" DynamicServicePath="" 
            Enabled="True" />
<asp:LinkButton ID="LinkButton3" runat="server"></asp:LinkButton>
                 </td>
                <td>
            <asp:Button ID="addOCSelectBTN" runat="server" CssClass="ms-crm-List-Header" Visible="false"
                OnClick="accionItem_Click" Text="Agregar Desde O/C" />
    </td>
                       </tr></table>

                 

    
                
               
  </asp:Panel>
                  
                  <asp:Panel ID="PanelBody" runat="server" Visible="false" BackColor="white" >
     <asp:UpdatePanel ID="CabeceraUpdatePanel" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
 
    <table >
  <tr>
 
 
 <td align="right" width="100px"  >

     Codigo:</td>
 <td  >
    
     <asp:Label ID="numDocumentoTextBox" runat="server"></asp:Label>
     <input type="hidden" runat="server" name="idobjectdsLabel" id="idobjectdsLabel" />
     <input type="hidden" runat="server" name="internalid" id="internalid"  />
     <input type="hidden" runat="server" name="idObra" id="idObra"  />
     <input id="idComparativoProveedorList" type="hidden" runat="server" />
     <input id="idMonedaList" type="hidden" runat="server" />
     <input id="idFormaPagoList" type="hidden" runat="server" />
     
     

 </td>
              <td   align="right">Obser. IGV:</td>
              <td> 
                  <asp:Label ID="IncluyeIGVLabel" runat="server" Text=""></asp:Label>
                  <asp:CheckBox ID="IncluyeIGVCHK" runat="server" Enabled="false"/>
                
      </td>
      <td valign="top" rowspan="5">
         
   <asp:UpdatePanel runat=server ID="panelTotal" UpdateMode="Conditional">
   <ContentTemplate>
   
     <table  class="PanelTotales" >
    
          <tr>
              <td >
                  Monto Base:</td>
              <td align="right" width="100px">
                  <asp:Label ID="totalBaseTextBox" runat="server" Text="" ></asp:Label>
              </td>
              <tr>
                  <th>
                       
                      <asp:Label ID="proveedor1LBL" runat="server" Text=""></asp:Label>
                  </th>
                  <td align="right" width="100px">
                      <asp:Label ID="total1TXT" runat="server" Text=""></asp:Label>
                      <br />
                  </td>
              </tr>
              <tr>
                  <td>
                       <asp:Label ID="proveedor2LBL" runat="server" Text=""></asp:Label>
                  </td>
                  <td align="right" width="100px">
                      <asp:Label ID="total2TXT" runat="server" Text=""></asp:Label>
                  </td>
              </tr>
          </tr>
          <tr>
              <td>
                  <asp:Label ID="proveedor3LBL" runat="server" Text=""></asp:Label>
              </td>
              <td align="right">
                  <asp:Label ID="total3TXT" runat="server" Text=""></asp:Label>
              </td>
          </tr>
      </table>
      
     
        </ContentTemplate>
                 </asp:UpdatePanel>
  
          
          </td>
 </tr>
          <tr>
              <td align="right"  >
                        Fecha: </td>
              <td  >
                  <lib:Input ID="fechaInsertTextBox" RunAt="Server" AutoPostBack="True" 
                      BackColor="Transparent" font-names="Arial" 
                      ontextchanged="fechaInsertTextBox_TextChanged" Width="100px"/>
                  <asp:ImageButton ID="ImageButton1" runat="Server" 
                      AlternateText="Click aqui para mostrar calendario" font-names="Arial" 
                       ImageUrl="../../../Images/month.gif"  />
              <asp:CalendarExtender ID="CalendarExtender2" runat="server"    TargetControlID="fechaInsertTextBox"      PopupButtonID="ImageButton1"></asp:CalendarExtender>
              </td> 
              

               <td  align="right" >
                   Observaciones:</td>
              <td rowspan="4">
                    <lib:Input ID="observacionesInsertTextBox" runat="server" 
                        BackColor="Transparent" Height="70px" TextMode="MultiLine" width="200px" />
              </td>





          </tr>
          <tr>
              <td align="right"   >
                        Partida de Compras:</td>
              <td >
                              
                  <asp:DropDownList ID="estructuraCostoDDL" runat="server" AutoPostBack="true" 
                      onselectedindexchanged="estructuraCostoDDL_Selected" Width="300px">
                  </asp:DropDownList>
                  <br />
                  <asp:HyperLink ID="estructuraCostoHLK" runat="server" ForeColor="Blue" />
             </td>
                         

              

             
            


              

             
          </tr>
            <tr>
                <td align="right">
                    Descripcion:</td>
                <td>
                    <lib:Input ID="descripcionInsertTextBox" runat="server" BackColor="Transparent" 
                        Width="300px" />
                </td>
        </tr>
          <tr>
          <td align="right"   >
          Moneda:</td>
          <td  >
              <cc2:DropDownCC ID="monedaDropDownList" runat="server" AutoPostBack="True" 
                  onselectedindexchanged="monedaDropDownList_SelectedIndexChanged" Width="132px">
              </cc2:DropDownCC>
              </td>

 
  </tr>
  </table>

                      
  


              </ContentTemplate>
     </asp:UpdatePanel>
   
    <asp:TabContainer ID="TabContainer1" runat="server" Width="100%" ActiveTabIndex="1">
    <asp:TabPanel ID="TabRecursos"    runat="server" HeaderText="Proveedores"  Font-Size="X-Small">
    <ContentTemplate>
Seleccione Proveedores: <asp:UpdatePanel ID="proveedorUpdatePanel" runat="server" 
                UpdateMode="Conditional"><ContentTemplate>
                <asp:GridView ID="proveedorGridView" Runat="Server" 
                            SkinID="GridView"
                            DataKeyNames="idInternal" 
                            onrowcancelingedit="CancelProveedorItem" 
                            onrowediting="EditProveedorItem" 
                            OnRowUpdating="UpdateProveedorItem" 
                            ShowFooter="True">
                            
                            <Columns>
                            <asp:TemplateField HeaderText="Proveedor" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="350px"><ItemTemplate>
                            <asp:Label ID="proveedorLabel" runat="server" BackColor="Transparent" 
                            Text='<%# Eval("descripcion")%>' Width="300px" />
                            </ItemTemplate>
                            <EditItemTemplate>
                            <lib:Input ID="proveedorEditTextBox" runat="server" backcolor="#DFE8F6" 
                            DataType="List" method="GetProveedor" 
                            onchange="javascript:validarProveedorEdit(this);" 
                            OnSelect="SelectProveedorEdit" text='<%# Eval("descripcion")%>' Width="300px" />


                            <lib:Input ID="idproveedorEditTextBox" runat="server" BackColor="Transparent"   
                            ReadOnly="true" Text='<%# Eval("idproveedor")%>' Width="0px" />
                            <lib:Input ID="proveedorEdit1TextBox" runat="server" BackColor="Transparent"  
                            ReadOnly="true" text='<%# Eval("descripcion")%>' Width="0px" />
                            </EditItemTemplate>
                            
                            <FooterTemplate>
                             <lib:Input ID="idproveedorInsertTextBox" runat="server" ReadOnly="true"     Width="0" />
                             <lib:Input ID="proveedorInsert1TextBox" runat="server" BackColor="Transparent"    ReadOnly="true" Width="0" />
                            <lib:Input ID="proveedorInsertTextBox" runat="server"  backcolor="#DFE8F6" NumColum="2"
                             
                              DataType="List" method="GetProveedor" 
                              onchange="javascript:validarProveedorInsert(this);" 
                              OnSelect="SelectProveedorInsert" Width="300px" />
                             
                              </FooterTemplate>
                              
                              </asp:TemplateField>
                              
                              
                              
                              <asp:TemplateField HeaderText="Forma Pago" HeaderStyle-HorizontalAlign="Left">
                              
                              
                              <ItemTemplate><asp:Label ID="formaPagoProveedorLabel" runat="server" BackColor="Transparent" 
                              
                                    Text='<%# Eval("formaPago")%>' Width="200px" />
                                    </ItemTemplate>
                                    
                                    
                                    
                                    <EditItemTemplate><lib:Input ID="formaPagoEditTextBox" runat="server" ReadOnly="true" 
                                        Text='<%# Eval("idFormaPago")%>' Width="0px"></lib:Input>
                                        <cc2:DropDownCC ID="formaPagoEditDropDownList" runat="server"
                                         Width="200px"  ></cc2:DropDownCC></EditItemTemplate>
                                         <FooterTemplate>
                                         
                                         <%--  <table>--%>
                                         
                                         <cc2:DropDownCC 
                                     ID="formaPagoInsertDropDownList" runat="server"  
                                       Width="200px"></cc2:DropDownCC>
                                       
                                       <%-- <tr><td>Moneda:</td><td><asp:DropDownList ID="monedaInsertDropDownList" runat="server" Enabled=false 
                                           AutoPostBack="True" Width="200px">
                                       </asp:DropDownList></td></tr>--%>
                                       
                                       
                                       </FooterTemplate>
                                       
                                       
                                       </asp:TemplateField>
                                       <asp:TemplateField HeaderText="condicion" HeaderStyle-HorizontalAlign="Left">
                                       <ItemTemplate>
                                       
                                       <asp:Label ID="condicionLabel" runat="server" BackColor="Transparent"  
                                      
                                    Text='<%# Eval("condicion")%>' Width="300px" />
                                    
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                    <lib:Input ID="condicionEditTextBox" runat="server" 
                             BackColor="Transparent" Text='<%# Eval("condicion")%>' TextMode="MultiLine"  
                             Width="300px" /></EditItemTemplate><FooterTemplate>
                             <lib:Input ID="condicionInsertTextBox" runat="server"   
                                 TextMode="MultiLine" Width="300px" /></FooterTemplate>

                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="">
                                
                                <ItemTemplate>
                                </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ControlStyle-Width="120px" HeaderText="Total"
                                 ItemStyle-HorizontalAlign="Right">
                                 <ItemTemplate>
                                 <asp:Label ID="totalLabel" runat="server" BackColor="Transparent"  
                                Text='<%# Eval("totalContrMon")%>' >
                                                </asp:Label></ItemTemplate>
                                                <EditItemTemplate><asp:Label ID="totalEditLabel"
                                                 runat="server"   
                                 Text='<%# Eval("totalContrMon")%>' /></EditItemTemplate>
                                
                                <FooterTemplate><asp:Label ID="totalInsertLabel" runat="server"   
                                    Text="0.00" Width="75" /></FooterTemplate></asp:TemplateField>
                                    
                           <asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel.gif" 
                            EditImageUrl="~/Images/edit.gif" ShowEditButton="true" 
                            UpdateImageUrl="~/Images/update.gif" />
                            
                            
                            <asp:TemplateField >
                            
                            <ItemTemplate>
                            
                            <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control"  
                                    CommandArgument='<%# Eval("idInternal")%>' OnClick="DeleteProveedorItem" 
                                    OnClientClick="return confirm('Usted quiere eliminar?')"  ImageUrl="~/Images/delete.gif"   /></ItemTemplate>
                                    
                                    
                                    <FooterTemplate>
                                    
                                    <asp:Button ID="addProvAdd" runat="server" OnClick="AddProveedorItem" Text="Añadir" />
                                    </FooterTemplate>
                                    </asp:TemplateField>
                                    
                                    
                                    </Columns></asp:GridView>
                                    </ContentTemplate></asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
                                    
                                    
                                    <asp:TabPanel ID="TabPanel1"    runat="server" HeaderText="Recursos" ><ContentTemplate>
                                    <asp:Panel  runat="server" ID="panel234"  >
  
  

  <table >
 
 <tr>
 <td align="right">
        
          
        </td>
 </tr>

      <tr>
          <td align="right">
              <table>
                  <tr>
                      <th align="right">
                         
                      </th>
                          <tr>
                          <td align="right" >
                              Correcto:</td>
                          <td>
                              <asp:Label ID="Label324" runat="server" BackColor="#009900" Text=" &nbsp; " 
                                  Width="35px"></asp:Label>

                          </td>
                                <td align="right" width="150px">
                              Supero el Limite:</td>
                          <td>
                              <asp:Label ID="Label4" runat="server" BackColor="#CC0000" Text=" &nbsp; " 
                                  Width="35px"></asp:Label>

                          </td>
                      </tr>
                  </tr>
              </table>
          </td>
      </tr>



  </table>
                                    
                                    </asp:Panel>

                                    
                                    
                                    <asp:UpdatePanel ID="panelGrilla" runat="server" UpdateMode="Conditional">
                                    
                                    <ContentTemplate>
                                    <asp:GridView ID="itemGridView" runat="server"  
                        DataKeyNames="idInternal" 
                       SkinID="GridView" 
                        
                        ShowHeader="true"
                        ShowHeaderWhenEmpty="true"
                        OnPageIndexChanging="OnPaging" 
                        onrowcancelingedit="CancelEditItem"  
                        OnRowCreated="ComparativoitemGridView_RowCreated"
                        OnRowDataBound="ComparativoitemoGridView_RowDataBound"
                        onrowediting="EditItem" onrowupdating="UpdateItem" ShowFooter="false" 
                       >
                       <Columns>
                           <asp:TemplateField HeaderStyle-Width="170px" ItemStyle-BackColor="#F2F3F7" 
                               ItemStyle-Width="170px"><HeaderTemplate>
                                   <asp:Label ID="header0BaseLabel" runat="server" Text="Saldo Actual">
                       </asp:Label>
                       </HeaderTemplate>
                       <ItemTemplate>
                       <table width="100%">
                       <tr><td align="right" width="55px">P.Unit.Ref: 
                       </td><td align="right">           
                               <asp:Label ID="precioBaseLabel" runat="server" 
                                   Text='<%# Eval("precioBaseMon")%>' /></td></tr>
                       <tr><td align="right">Cantidad:</td>
                           <td align="right">
                       <asp:Label ID="Label233" runat="server" Text='<%# Eval("cantidadOrig") %>'></asp:Label>
                       </td></tr><tr><td align="right">Monto:</td>
                               <td align="right">
                       <asp:Label ID="Label3433" runat="server" Text='<%# Eval("totalBaseMonOrig") %>'>
                       </asp:Label></td></tr></table>
                       </ItemTemplate>
                       <EditItemTemplate>
                       
                       <table width="100%">
                       <tr><td align="right">P.Unit.Ref:</td>
                           <td align="right">
                       <asp:Label ID="precioBaseEditLabel" runat="server" Text='<%# Eval("precioBaseMon")%>' 
                                   Width="80px" />
                       </td></tr><tr><td align="right">Cantidad:</td>
                               <td align="right">
                                   <asp:Label ID="Label233" runat="server" Text='<%# Eval("cantidadOrig") %>'></asp:Label></td></tr>
                           <tr><td align="right">Monto:</td>
                               <td align="right">
                       
                       
                       <asp:Label ID="Label3433" runat="server" Text='<%# Eval("totalBaseMonOrig") %>'></asp:Label></td></tr></table>
                       </EditItemTemplate></asp:TemplateField>
                       
                       
                       
                       <asp:TemplateField HeaderText="Codigo" ControlStyle-Width="80px" HeaderStyle-Width="80px"
                                 >
                           <ItemTemplate>
                       <asp:Label ID="codigoLabel" runat="server" Text='<%# Eval("codigo")%>'></asp:Label></ItemTemplate>
                       <EditItemTemplate>
                       <asp:Label ID="codigoEditTextBox" runat="server" Text='<%# Eval("codigo")%>'></asp:Label>
 <lib:Input ID="precioBaseEditTextBox" runat="server" BackColor="Transparent" ForeColor="Transparent" 
                               ReadOnly="true" Text='<%# Eval("precioBase")%>' Width="0px" />
<lib:Input ID="totalBaseEditTextBox" runat="server" BackColor="Transparent" ForeColor="Transparent" 
                               ReadOnly="true" Text='<%# Eval("totalBaseOrig")%>' Width="0px" />


                       </EditItemTemplate>
                       
                       
                       </asp:TemplateField>
                            <asp:TemplateField HeaderText="Descripcion" ControlStyle-Width="150px" 
                       HeaderStyle-Width="150px"><ItemTemplate>
                       <asp:Label ID="descripcionLabel" runat="server" 
                                         Text='<%# Eval("descripcion")%>' >
                                 </asp:Label>
                                 
                                 </ItemTemplate>
                                 
                                 <EditItemTemplate><asp:Label ID="descripcionEditTextBox" runat="server" 
                                         Text='<%# Eval("descripcion")%>' ></asp:Label>
                                         
                                 </EditItemTemplate>
                                         
                                 </asp:TemplateField>
                           
                           <asp:TemplateField HeaderText="Unid." ControlStyle-Width="50px" 
                               HeaderStyle-Width="50px" >
                               <ItemTemplate><asp:Label ID="unidadLabel" runat="server" 
                                       Text='<%# Eval("unidad")%>'>
                                 </asp:Label></ItemTemplate>
                                 
                                 
                                 <EditItemTemplate>
                                 
                                 
                                 <lib:Input ID="unidadEditTextBox" runat="server" BackColor="Transparent" 
                                         ReadOnly="true" Text='<%# Eval("unidad")%>'>
                                 </lib:Input>
                                 <lib:Input ID="controlRadioOrigEditTextBox" runat="server" BackColor="Transparent" 
                                         ForeColor="Transparent" ReadOnly="true" Text='<%# Eval("bitControlCantOrig")%>' 
                                         Width="0px" />
                                   <lib:Input ID="controlRadioEditTextBox" runat="server" BackColor="Transparent" 
                                         ForeColor="Transparent" ReadOnly="true" Text='<%# Eval("bitControlCant")%>' 
                                         Width="0px" />

                                 </EditItemTemplate>

                                 </asp:TemplateField>
                                 
                                 
                                 <asp:TemplateField HeaderText="">
                                 
                                 
                                 
                                 </asp:TemplateField>
                                   
                                   <asp:TemplateField HeaderText="Cantidad"      HeaderStyle-Width="80px" 
                               ControlStyle-Width="80px"><ItemTemplate>
                                   <asp:Label ID="descripcionLabel" runat="server" 
                                   Text='<%# Eval("descripcion")%>'>
                                 </asp:Label></ItemTemplate>
                                 <EditItemTemplate>
                                   <asp:Label ID="descripcionEditTextBox" runat="server" 
                                   Text='<%# Eval("descripcion")%>'></asp:Label>
                                   </EditItemTemplate>
                                       <ItemTemplate>
                                    
                                    <table>
                                    <tr>
                                    <td align="right">
                                    <asp:Label ID="cantidadBaseLabel" runat="server" Text='<%# Eval("cantidadBase")%>' 
                                            Width="80">
                                     </asp:Label>
                                     </td></tr>
                                     </table>
                                     </ItemTemplate>
                                     <EditItemTemplate>
                                     
                                     <table width="100%">
                                     
                                     <tr>
                                     <td align="right">
                                     Disp.:</td>
                                     <td align="right">
                                     <lib:Input ID="cantidadBaseEditTextBox" runat="server" BackColor="Transparent" 
                                             ReadOnly="true" Text='<%# Eval("cantidadOrig")%>' Width="80" />
                                      </td>
                                      </tr>
                                      <tr>
                                      <td align="right">Uso:</td><td>
                                      <lib:Input ID="cantidadCompararEditTextBox" runat="server" DataType="Double" 
                                              onchange="javascript:calcularTotalACompararXCantidadEdit(this);" 
                                              Text='<%# Eval("cantidadBase")%>' Width="80" />
                                              </td>
                                              </tr>
                                              </table>
                                              </EditItemTemplate>
                                              </asp:TemplateField>


                                              <asp:TemplateField HeaderText="" ></asp:TemplateField>




                                                 <asp:TemplateField HeaderStyle-HorizontalAlign="Right" 
                               HeaderStyle-Width="120px" HeaderText="Proveedor 1" ItemStyle-Width="150px">
                                                 <ItemTemplate>
                                                 
                                                 <table width="100%">
                                                 <tr>
                                                 <td align="right">Precio:
                                                 </td>
                                                 <td align="right">
                                                    <asp:Label ID="precio1Label" runat="server" BackColor="Transparent" 
                                                         Text='<%# Eval("precio1Mon")%>'></asp:Label>
                                                </td></tr>
                                                <tr>
                                                <td align="right">Total:</td>
                                                <td align="right">
                                                <asp:Label ID="total1Label" runat="server" BackColor="Transparent" 
                                                        Text='<%# Eval("total1Mon")%>'></asp:Label>

                                     </td></tr></table>
                                     
                                     </ItemTemplate>
                                     
                                     
                                     
                                     <EditItemTemplate>
                                    <table>
                                    <tr>
                                    <td align="right">Precio:</td>
                                    <td> <lib:Input ID="precio1EditTextBox" runat="server" DataType="Double" 
                                             onchange="javascript:calcularTotalProve1XPresioEdit(this);" 
                                             Text='<%# Eval("precio1")%>' Width="80" /> </td>
                                    </tr>
                                    <tr>
                                    <td align="right">Total:</td>
                                    <td><lib:Input ID="total1EditTextBox" runat="server" DataType="Double" 
                                             onchange="javascript:calcularPrecioProve1XTotalEdit(this);" 
                                             Text='<%# Eval("total1")%>' Width="80" /></td>
                                    </tr>
                                    
                                    </table>
                                     
                                                     
                                                     
                                                         
                                     </EditItemTemplate>
                                     </asp:TemplateField>

                                     <asp:TemplateField HeaderStyle-HorizontalAlign="Right" 
                               HeaderStyle-Width="120px" HeaderText="Proveedor 2" ItemStyle-Width="150px">
                                         <ItemTemplate>
                          
                          <table width="100%">
                          <tr>
                          
                          <tr>
                          <td align="right"><asp:Label ID="precio2Label" runat="server" 
                                  Text='<%# Eval("precio2Mon")%>'></asp:Label>
                          </td>
                          </tr>
                          <tr>
                          <td align="right">
                              <asp:Label ID="total2Label" runat="server" Text='<%# Eval("total2Mon")%>'></asp:Label></td>
                           </tr>
                           </tr></table>
                           </ItemTemplate>
                                     <EditItemTemplate><table border="0">
                                         <tr><td></td></tr>
                                         <tr><td><%--<asp:Label ID="simbol2Label" runat="server" BackColor="Transparent" 
                                             Text='<%Eval(simbol2") %>' Width="0px"></asp:Label>--%></td></tr>
                                         <tr><td align="right">
                                             <lib:Input ID="precio2EditTextBox" runat="server" DataType="Double" 
                                                 onchange="javascript:calcularTotalProve2XPresioEdit(this);" 
                                                 Text='<%# Eval("precio2")%>' Width="80" /></td></tr>
                                         <tr><td align="right">
                                                     <lib:Input ID="total2EditTextBox" runat="server" DataType="Double" 
                                                 onchange="javascript:calcularPrecioProve2XTotalEdit(this);" 
                                                 Text='<%# Eval("total2")%>' Width="80" /></td></tr></table></EditItemTemplate>
                                                 
                                                 
                                                 </asp:TemplateField>
                                                    
                                                    
                                                    
                                                    
                                                    <asp:TemplateField HeaderStyle-HorizontalAlign="Right" 
                               HeaderStyle-Width="150px" HeaderText="Proveedor 3">
                                              <ItemTemplate>
                                                      <table>
                                                      <tr>
                                                      <td align="right">Precio:</td>
                                                      </tr>
                                                      <tr>
                                                      <td align="right">Total:</td>
                                                      </tr>
                                                      </table>
                                              </ItemTemplate>
                                              
                                              
                                                 
                                                 
                          <ItemTemplate>
                          
                          
                          <table width="100%">
                          
                          <tr><td align="right">
                          <asp:Label ID="precio3Label" runat="server" Text='<%# Eval("precio3Mon")%>'></asp:Label></td></tr><tr>
                          <td align="right"><asp:Label ID="total3Label" runat="server" 
                                  Text='<%# Eval("total3Mon")%>'></asp:Label>
                          </td></tr></table>
                          
                          
                          </ItemTemplate>
                          
                          
                          <EditItemTemplate>
                          
                          <table border="0"><tr>
                              <td></td></tr><tr>
                              <td><%--<asp:Label ID="simbol3Label" runat="server" BackColor="Transparent" 
                                             Text='<%Eval(simbol3") %>' Width="0px"></asp:Label>--%></td></tr>
                              <tr><td align="right">
                                             <lib:Input ID="precio3EditTextBox" runat="server" DataType="Double" 
                                      onchange="javascript:calcularTotalProve3XPresioEdit(this);" 
                                      Text='<%# Eval("precio3")%>' Width="80" /></td></tr>
                              <tr><td align="right">
                                                     <lib:Input ID="total3EditTextBox" runat="server" 
                                      DataType="Double" onchange="javascript:calcularPrecioProve3XTotalEdit(this);" 
                                      Text='<%# Eval("total3")%>' Width="80" /></td></tr></table>
                                                     
                                                     </EditItemTemplate>


                                                     </asp:TemplateField>
                                                     
                                                     
                                                     <asp:CommandField ButtonType="Image" 
                         CancelImageUrl="~/Images/cancel.gif" EditImageUrl="~/Images/edit.gif" 
                         ShowEditButton="true" UpdateImageUrl="~/Images/update.gif" />
                         
                         
                         <asp:TemplateField>
                         
                                    <ItemTemplate>
                                    
                                    
                                    
                                    
                                    </ItemTemplate>
                                  <EditItemTemplate>
                                  
                                 
                                   </EditItemTemplate>

                                   
                               <ItemTemplate>
                                   <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                                       CommandArgument='<%# Eval("idInternal")%>' ImageUrl="~/Images/delete.gif" 
                                       OnClick="Deleteitem" OnClientClick="return confirm('Usted quiere eliminar?')" /></ItemTemplate>
                               <FooterTemplate>
                                   <asp:LinkButton ID="btnAdd" runat="server" OnClick="AddNewItem" 
                                       Text="&lt;img src=&quot;../Images/up.gif&quot; /&gt;"></asp:LinkButton>
                                   <asp:LinkButton ID="cancelLinkButton" runat="server" BorderStyle="None" 
                                       OnClick="AddNewItem" Text="&lt;img src=&quot;../Images/cancel.gif&quot; /&gt;"></asp:LinkButton></FooterTemplate></asp:TemplateField>
                                       </Columns>
                                        <EditRowStyle BackColor="#FFFF99" BorderStyle="Outset" />
                                        <FooterStyle BackColor="#FFFF99" BorderStyle="Outset" />
                                        <HeaderStyle backcolor="#DFE8F6" Font-Bold="True" forecolor="#336699"  BorderColor="LightSteelBlue"/></asp:GridView>
                                     
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdateProveedores2" runat="server" UpdateMode="Conditional"></asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel></asp:TabContainer>

   
     
           <asp:Panel ID="AddECItemParent" runat="server" CssClass="modalPopup"  Width="800px">
  <asp:Panel ID="AddAddECItem"   runat="server"    Style="background-color:#DDDDDD; border:solid 1px Gray;color:Black">
              <asp:Panel ID="Panel2" runat="server" CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
               Seleccionar Recursos
                </asp:Panel>

         <asp:Panel ID="Panel20" runat="server"  
          class="ms-crm-Dialog-Footer ms-crm-Dialog-Footer-Right">
      <asp:UpdatePanel ID="AddECItemUpdatePanel" runat="server" UpdateMode="Conditional">
      <ContentTemplate>


      <uc2:ECItemSeleccionMonPanel ID="ECItemSeleccionMonPanel1" runat="server" />

                </ContentTemplate>
         <Triggers>
         <%--<asp:AsyncPostBackTrigger ControlID ="TabContainer1$TabPanel1$AddECSelectBTN" />--%>
         <asp:AsyncPostBackTrigger ControlID ="AddECSelectBTN" />
         </Triggers>  
         </asp:UpdatePanel>  
                     
            </asp:Panel>

          
          
          <asp:Panel ID="Panel18" runat="server"   >
        
<table width="100%" >
 <tr  >
               
                <td class=" ms-crm-Dialog-Footer-Right">
               
                     <asp:Button ID="OkAddECItemButton"  runat="server"  Text="Añadir Seleccion "  CssClass="ms-crm-List-Header"
                      onclick="AddRecurso_Click"    
                       
                        />&nbsp;
                    <asp:Button ID="CancelAddECItemButton"  runat="server" Text="Cancelar" CssClass="ms-crm-List-Header"
                    
                       
                       />
                   
                </td>
   </tr>


   
</table>
        </asp:Panel> 
  
           
        </asp:Panel>
          </asp:Panel>
           
    
      <asp:Panel ID="proveedorIntParentPanel"   runat="server" Height="200px"  Width="450px"  Font-Names="Arial">
    <asp:Panel ID="proveedorPanel" runat="server"   Height="200px"   Width="450px"  
    Style="cursor: move;background-color:#DDDDDD;border:solid 1px Gray;color:Black">
            <asp:Panel ID="Panel1" runat="server" CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
               Seleccionar Proveedor
                </asp:Panel>

        <asp:Panel ID="Panelsuperior" runat="server" Height="150px" Width="100%"> 

        <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="actualizaProvPanel" >
        <ContentTemplate>
        
        <table class="PanelTotales">
        <tr>
        <td align="right" Width="100%">Total Base:
        
            <asp:Label ID="totalBase" runat="server" Text=""></asp:Label>
        </td>
        </tr>
        </table>
        
                     <asp:RadioButtonList ID="ProveedorRadioButtonList" runat="server"  BackColor="White" Width="100%">
                     </asp:RadioButtonList>
        
        
        
       </ContentTemplate>
       <Triggers>
       <asp:AsyncPostBackTrigger ControlID="saveButton" />
       </Triggers>
        </asp:UpdatePanel>
        </asp:Panel>



             <asp:Panel ID="Panel1FProveedor" runat="server"   >
        
<table width="100%" >
 <tr  >
               
                <td class=" ms-crm-Dialog-Footer-Right">
               
                     <asp:Button ID="aceptarSelecProvButton"  runat="server"  Text="Guardar Comparativo"  CssClass="ms-crm-List-Header"
                      onclick="aceptarSelecProvButton_Click"    
                       
                        /> 
                    <asp:Button ID="cancelarSelecProvButton"  runat="server" Text="Cancelar" CssClass="ms-crm-List-Header"
                    
                       
                       /> 
                   
                     <br />
                   
                </td>
   </tr>


   
</table>
        </asp:Panel> 


    </asp:Panel>
    </asp:Panel>

      <asp:Panel ID="AddECItemOCParent" runat="server" CssClass="modalPopup"  Width="800px">
  <asp:Panel ID="AddAddECOCItem"   runat="server"    Style="background-color:#DDDDDD; border:solid 1px Gray;color:Black">
               <asp:Panel ID="Panel4" runat="server"  
          class="ms-crm-Dialog-Footer ms-crm-Dialog-Footer-Right">
      <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
      <ContentTemplate>

      <uc3:ECOCPanel ID="ECOCPanel1" runat="server" />
      
        
        
                </ContentTemplate>
         <Triggers>
         <%--<asp:AsyncPostBackTrigger ControlID ="TabContainer1$TabPanel1$addOCSelectBTN" />--%>
         <asp:AsyncPostBackTrigger ControlID ="addOCSelectBTN" />
         </Triggers>  
         </asp:UpdatePanel>  
                     
            </asp:Panel>

            
           
          <asp:Panel ID="Panel5" runat="server"   >
        
<table width="100%" >
 <tr  >
               
                <td class=" ms-crm-Dialog-Footer-Right">
               
                     <asp:Button ID="AddOCBTN"  runat="server"  Text="Añadir Seleccion "  CssClass="ms-crm-List-Header"
                      onclick="AddOC_Click"    
                       
                        />&nbsp;
                    <asp:Button ID="CancelAddECItemOCButton"  runat="server" Text="Cancelar" CssClass="ms-crm-List-Header"
                    
                       
                       />
                   
                </td>
   </tr>


   
</table>
        </asp:Panel> 

        </asp:Panel>
          </asp:Panel>

     </asp:Panel>   

    </form>
</body>
</html>
